
<!--某些字体图标-->
<link href="__SHOP_DEFAULT__/custom/css/iconfont.css" rel="stylesheet" />
<link href="__SHOP_DEFAULT__/custom/css/font-family.css" rel="stylesheet" />
<link href="__SHOP_DEFAULT__/custom/css/base.css" rel="stylesheet">


<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{if ($hidden_ncToolbar != 1)}
<div id="vToolbar" class="nc-appbar">
  	<div class="nc-appbar-tabs" id="appBarTabs">
    	{if session('is_login')}
		    <div class="user ta_delay" nctype="a-barUserInfo">
		      	<div class="avatar">

		      		{if session('avatar')}
			      		<img src="{:session('avatar')}">
		      		{else /}
		      			<img src="__UPLOAD_PATH__/shop/common/default_user_portrait.gif">
		      		{/if}
		      	</div>
		      	<p><a href="{:url('member/Shop/index')}">个人中心</a></p>
		    </div>
		    <div class="user-info" nctype="barUserInfo" style="display:none;">
		    	<i class="arrow"></i>
		      	<div class="avatar">
		      		{if session('avatar')}
		      			<img src="{:session('avatar')}">
		      		{else /}
		      			<img src="__UPLOAD_PATH__/shop/common/default_user_portrait.gif">
		      		{/if}
		        	<div class="frame"></div>
		      	</div>
			    <dl>
			        <dt>Hi, <a href="{:url('member/Index/index')}">{:session('member_name')}</a></dt>
			        <dd>当前等级：<strong nctype="barMemberGrade">{$member_info['level_name']}</strong></dd>
			        <dd>当前经验值：<strong nctype="barMemberExp">{$member_info['member_exppoints']}</strong></dd>
			    </dl>
		    </div>
    	{else /}
	    	<div class="user ta_delay" nctype="a-barLoginBox">
		      	<div class="avatar">
		      		<img src="__UPLOAD_PATH__/shop/common/default_user_portrait.gif">
		      	</div>
		      	<p>未登录</p>
	    	</div>
	    	<div class="user-login-box" nctype="barLoginBox" style="display:none;"> 
	    		<i class="arrow"></i> 
	    		<a href="javascript:void(0);" class="close-a" nctype="close-barLoginBox" title="关闭">X</a>
	      		<form id="login_form" method="post" action="{:url('member/Login/index')}" onsubmit="ajaxpost('login_form', '', '', 'onerror')">
		        	<dl>
		          		<dt><strong>登录账号</strong></dt>
				        <dd>
				            <input type="text" class="text" tabindex="1" autocomplete="off"  name="user_name" autofocus >
				            <label></label>
				        </dd>
		        	</dl>
			        <dl>
			          	<dt>
			          		<strong>登录密码</strong>
			          		<a href="{:url('member/Login/forget_password')}" target="_blank">忘记登录密码？</a>
			          	</dt>
			          	<dd>
			            	<input tabindex="2" type="password" class="text" name="password" autocomplete="off">
			            	<label></label>
			          	</dd>
			        </dl>
			        {if sysconf('captcha_status_login') == '1'}
			        <dl>
			          	<dt><strong>验证码</strong><a href="javascript:void(0)" class="ml5" onclick="javascript:document.getElementById('codeimage').src='{:captcha_src()}?rand=' + Math.random();">更换验证码</a></dt>
				        <dd>
				            <input tabindex="3" type="text" name="captcha" autocomplete="off" class="text w130" id="captcha2" maxlength="4" size="10" />
				            <img src="" name="codeimage" border="0" id="codeimage" class="vt">
				            <label></label>
				        </dd>
			        </dl>
		        	{/if}
		            <div class="bottom">
		              	<input type="submit" class="submit" value="确认">
		              	<input type="hidden" value="{$ref_url}" name="ref_url">
			            <a href="{:url('member/Login/register')}?ref_url={$ref_url}" target="_blank">注册新用户</a>
			            
			            {if (sysconf('qq_isuse') == 1 || sysconf('sina_isuse') == 1 || sysconf('weixin_isuse') == 1)}
				            <h4>使用合作网站账号登录</h4>
				            {if sysconf('weixin_isuse') == 1}
				            	<a href="javascript:void(0);" onclick="ajax_form('weixin_form', '微信账号登录', '{:url(\'connect_wx/index\')}', 360);" title="微信账号登录" class="mr20">微信</a>
				            {/if}
				            {if sysconf('sina_isuse') == 1}
				            	<a href="{:url('ConnectSina/index')}" title="新浪微博账号登录" class="mr20">新浪微博</a>
				            {/if}
				            {if sysconf('qq_isuse') == 1}
				            	<a href="{:url('ConnectQq/index')}" title="QQ账号登录" class="mr20">QQ账号</a>
				            {/if}
			            {/if}
		          	</div>
	     		</form>
	    	</div>
    	{/if}
    
	    <ul class="tools">
		    {if sysconf('node_chat')}
		      	<li>
		      		<a href="javascript:void(0);" id="chat_show_user" class="chat ta_delay">
		      			<div class="tools_img"></div>
		      			<span>聊天</span>
		      			<i id="new_msg" class="new_msg" style="display:none;"></i>
		      		</a>
		      	</li>
		    {else /}
		        <li>
		         	<a href="http://wpa.qq.com/msgrd?v=3&amp;uin={:sysconf('site_qq')}&amp;site=qq&amp;menu=yes" id="chat_show_user" class="chat ta_delay" target="_blank">
		         		<div class="tools_img"></div>
		         		<span>QQ客服</span>
		         		<i id="new_msg" class="new_msg" style="display:none;"></i>
		         	</a>
		        </li>
		    {/if}
		    
		    {if (!$hidden_rtoolbar_cart)}
		      	<li>
			      	<a href="javascript:void(0);" id="rtoolbar_cart" class="cart ta_delay">
			      		<div class="tools_img"></div>
			      		<span>购物车</span>
			      		<i id="rtoobar_cart_count" class="new_msg" style="display:none;"></i>
			      	</a>
		      	</li>
		    {/if}
		   <!--  {if (!$hidden_rtoolbar_compare)}
		      	<li>
			      	<a href="javascript:void(0);" id="compare" class="compare ta_delay">
			      		<div class="tools_img"></div>
			      		<span>对比</span>
			      	</a>
		      	</li>
		    {/if} -->
		    <li>
		    	<a href="javascript:void(0);" id="gotop" class="gotop ta_delay">
		    		<div class="tools_img"></div>
		    		<span>顶部</span>
		    	</a>
		    </li>
		</ul>
	    <div class="content-box" id="content-compare">
	      	<div class="top">
	        	<h3>商品对比</h3>
	        	<a href="javascript:void(0);" class="close" title="隐藏"></a>
	      	</div>
	      	<div id="comparelist"></div>
	    </div>
	    <div class="content-box" id="content-cart">
	      	<div class="top">
	        	<h3>我的购物车</h3>
	        	<a href="javascript:void(0);" class="close" title="隐藏"></a>
	      	</div>
	      	<div id="rtoolbar_cartlist"></div>
	    </div>
	    <a id="activator" href="javascript:void(0);" class="nc-appbar-hide"></a> 
  	</div>
  	
	<div class="nc-hidebar" id="ncHideBar">
	    <div class="nc-hidebar-bg">
	      	{if session('is_login')}
		      	<div class="user-avatar">
		      		{if session('avatar')}
		      			<img src="{:session('avatar')}">
		      		{else /}
		      			<img src="__UPLOAD_PATH__/shop/common/default_user_portrait.gif">
		      		{/if}
		      	</div>
	      	{else /}
		      	<div class="user-avatar">
		      		<img src="__UPLOAD_PATH__/shop/common/default_user_portrait.gif">
		      	</div>
	      	{/if}
	      	<div class="frame"></div>
	      	<div class="show"></div>
	  	</div>
	</div>
</div>
{/if}

<!-- 顶部
{if (sysconf('top_banner_status')>0 && FU_current_module() == 'home' && FU_current_controller() == 'Index' && FU_current_action() == 'index')}
<div style=" background:{:sysconf('top_banner_color')};">
  	<div class="wrapper" id="top-banner" style="display: none;">
      	<a href="javascript:void(0);" class="close" title="关闭"></a>
      	<a href="{:sysconf('top_banner_url')}" title="{:sysconf('top_banner_name')}">
      		<img border="0" src="{:sysconf('top_banner_pic')}" alt="">
      	</a>
  	</div>
</div>
{/if}  -->
<div class="public-top-layout w">
    <div class="topbar wrapper">
        <div class="service fl">
            <div class="tel">您好，欢迎来到<a href="/">云南康乐茶网</a></div>
    	</div>
    	
    	<div class="quick-menu">
    		<dl>
		        <dt>我的商城<i></i></dt>
		        <dd>
		          	 <ul>
				            <!--<li><a href="{:url('member/Message/message')}">我的消息(<span>{if $message_num > 0} {$message_num} {else /} 0 {/if}</span>)</a></li>-->
				            <li><a href="{:url('member/Order/index')}" class="arrow">我的订单<i></i></a></li>
				            <!--<li><a href="{:url('member/Consult/my_consult')}">客服回复(<span id="member_consult">0</span>)</a></li>-->
				            <li><a href="{:url('member/Favoritegoods/fglist')}" class="arrow">我的收藏<i></i></a></li>
				            {if (sysconf('voucher_allow') == 1)}
				            <!--<li><a href="{:url('member/Voucher/index')}">优惠券(<span id="member_voucher">0</span>)</a></li>-->
				            {/if}
				            {if (sysconf('points_isuse') == 1)}
				            <!--<li><a href="{:url('member/Points/index')}" class="arrow">积分查询<i></i></a></li>-->
				            {/if}
			            </ul>
		        </dd>
		    </dl>
		    
		 
		    <dl>
		        <dt>客户服务<i></i></dt>
		        <dd>
		          	<ul>
			            <li><a href="{:url('home/Article/article',array('ac_id'=>2))}">帮助中心</a></li>
			            <!-- <li><a href="{:url('home/Article/article',array('ac_id'=>5))}">售后服务</a></li>
			            <li><a href="{:url('home/Article/article',array('ac_id'=>6))}">客服中心</a></li> -->
			            <li><a href="http://wpa.qq.com/msgrd?v=3&amp;uin={:sysconf('site_qq')}&amp;site=qq&amp;menu=yes" target="_blank">在线客服</a></li>
		          	</ul>
		        </dd>
		    </dl>
		    <dl>
		        <dt>
		        	<a href="{:url('shop/Showjoinin/index')}" title="商家管理">商家管理</a><i></i>
		        </dt>
		        <dd>
		          	<ul>
				   	 	<li><a href="{:url('shop/Showjoinin/index')}" title="招商入驻">招商入驻</a></li>
		            	<li><a href="{:url('seller/Sellerlogin/show_login')}" target="_blank" title="商家登录">商家登录</a></li>
		          	</ul>
			 	</dd>
		    </dl>
      		<?php
			    if(!empty($nav_list) && is_array($nav_list)){
				    foreach($nav_list as $nav){
				      	if($nav['nav_location']<1){
				      		$nav_list_top[] = $nav;
				      	}
				    }
			    }
      			if(!empty($nav_list_top) && is_array($nav_list_top)){
      		?>
			    <dl>
			        <dt>网站导航<i></i></dt>
			        <dd>
			          <ul>
			            <?php foreach($nav_list_top as $nav){?>
			            <li><a
			        <?php
			        if($nav['nav_new_open']) {
			            echo ' target="_blank"';
			        }
			        echo ' href="';
			        switch($nav['nav_type']) {
			        	case '0':echo $nav['nav_url'];break;
			        	case '1':echo url('shop/Goods/goods_list',array('cate_id'=>$nav['item_id']));break;
			        	case '2':echo url('cms/Article/article_list',array('ac_id'=>$nav['item_id']));break;
			        	case '3':echo url('Activity/index',array('activity_id'=>$nav['item_id']));break;
			        }
			        echo '"';
			        ?>><?php echo $nav['nav_title'];?></a></li>
			            <?php }?>
			          </ul>
			        </dd>
			    </dl>
      		<?php } ?>
    	</div>
    	
	
        
	    <div class="user-entry">
	      	您好, 
	      	{if session('is_login')}
	      		<span> <a href="{:url('member/Shop/index')}">{:session('member_name')}</a>
	      			{if ($member_info['level_name']) && 1==2}
	      			<div class="nc-grade-mini" style="cursor:pointer;" onclick="javascript:go('{:url('Pointgrade/index')}');">{$member_info['level_name']}</div>
	      			{/if}
	      		</span>
	      		<span class="wr">
	      			<a href="{:url('/member/Login/logout')}">退出</a>
	      		</span>
	      	{else /}
	      		<span class="wr">
	      			<a class="login" href="{:url('member/Login/index')}">请登录</a>
	      			<a href="{:url('member/Login/register')}">注册</a>
	      		</span>
	      	{/if}
	    </div>
  	</div>
</div>

<script type="text/javascript">	
//登录开关
var connect_qq = "{:sysconf('qq_isuse')}";
var connect_sn = "{:sysconf('sina_isuse')}";
var connect_wx = "{:sysconf('weixin_isuse')}";
var connect_weixin_appid = "{:sysconf('weixin_appid')}";

$(function() {
	$('#gotop').click(function(){
        $('html, body').animate({
            scrollTop: 0
        }, 500);
	});
	//顶部banner
	var ynwebskey = getCookie('ynwebskey');
		if(ynwebskey){
		$("#top-banner").hide();
		} else {
			$("#top-banner").slideDown(800);
			}
		$("#top-banner .close").click(function(){
			setCookie('ynwebskey','yes',1);
			$("#top-banner").hide();
	});
	//我的商城
		$(".head-user-mall dl").hover(function() {
			$(this).addClass("hover");
		},
		function() {
			$(this).removeClass("hover");
		});
		// 最近浏览的商品
		$('.head-user-mall .my-mall').mouseover(function(){
			load_history_information();
			$(this).unbind('mouseover');
		});
	
		$('#activator').click(function() {
			$('#content-cart').animate({'right': '-250px'});
			$('#content-compare').animate({'right': '-250px'});
			$('#vToolbar').animate({'right': '-60px'}, 300,
			function() {
				$('#ncHideBar').animate({'right': '59px'},	300);
			});
	        $('div[nctype^="bar"]').hide();
		});
		$('#ncHideBar').click(function() {
			$('#ncHideBar').animate({
				'right': '-86px'
			},
			300,
			function() {
				$('#content-cart').animate({'right': '-250px'});
				$('#content-compare').animate({'right': '-250px'});
				$('#vToolbar').animate({'right': '6px'},300);
			});
		});
    $("#compare").click(function(){
    	if ($("#content-compare").css('right') == '-250px') {
 		   loadCompare(false);
 		   $('#content-cart').animate({'right': '-250px'});
  		   $("#content-compare").animate({right:'0px'});
    	} else {
    		$(".close").click();
    		$(".chat-list").css("display",'none');
        }
	});
    $("#rtoolbar_cart").click(function(){
        if ($("#content-cart").css('right') == '-250px') {
         	$('#content-compare').animate({'right': '-250px'});
    		$("#content-cart").animate({right:'0px'});
    		if (!$("#rtoolbar_cartlist").html()) {
    			$("#rtoolbar_cartlist").load("{:url('shop/Cart/ajax_load')}?type=html");
    		}
        } else {
        	$(".close").click();
        	$(".chat-list").css("display",'none');
        }
	});
	$(".close").click(function(){
		$(".content-box").animate({right:'-250px'});
      });

	$(".quick-menu dl").hover(function() {
		$(this).addClass("hover");
	},
	function() {
		$(this).removeClass("hover");
	});

    // 右侧bar用户信息
    $('div[nctype="a-barUserInfo"]').click(function(){
        $('div[nctype="barUserInfo"]').toggle();
    });
    // 右侧bar登录
    $('div[nctype="a-barLoginBox"]').click(function(){
    	$.show_nc_login();
        //$('div[nctype="barLoginBox"]').toggle();
        //document.getElementById('codeimage').src='{:captcha_src()}?rand=' + Math.random();
    });
    $('a[nctype="close-barLoginBox"]').click(function(){
        $('div[nctype="barLoginBox"]').toggle();
    });
    {if ($cart_goods_num > 0)}
    $('#rtoobar_cart_count').html({$cart_goods_num}).show();
    {/if}
    });
</script>